<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <script>
        function f() {
            var kaptchaEl = document.getElementById("kaptchaImg");
            kaptchaEl.setAttribute("src", "/kaptcha");
        }
    </script>
</head>
<body>
    <p th:text="${session.SPRING_SECURITY_LAST_EXCEPTION}"></p>
    <p th:text="${SPRING_SECURITY_LAST_EXCEPTION}"></p>
    <h2>用户登录</h2>
    <form th:action="@{/doLogin}" method="post">
        用户名：<input type="text" name="username"><br>
        密&nbsp;&nbsp;&nbsp;码：<input type="password" name="password"><br>
        验证码：<input type="text" name="kaptcha"><img id="kaptchaImg" th:src="@{/kaptcha}" onclick="f()" alt=""><br>
        <input type="submit" value="登录">
    </form>
</body>
</html>
